<?php
class Minfo extends CI_Model{
    
    public function __construct(){
        parent::__construct();
        $this->load->database();
    }

    public function getInfo(){
        $this->db->select('name, uname');
        $this->db->from('info');
        $this->db->where("status", 1);
        $query = $this->db->get();
        return $query->result_array();
    } 
    
    public function getInfobyUname($uname){
        $this->db->select('id, name, uname, page_title, page_keyword, page_description');
        $this->db->from('info');
        $this->db->where("uname", $uname);
        $query = $this->db->get();
        return $query->row_array();
    } 
}
?>